﻿<Window 
  x:Class="CategoryEditor.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:pg="http://schemas.denisvuyka.wordpress.com/wpfpropertygrid"
  xmlns:local="clr-namespace:CategoryEditor"
  Title="How do I: Create Category Editor" Height="280" Width="320">
  
  <Window.Resources>
    <local:BusinessObject x:Key="BusinessObject"/>
  </Window.Resources>
  
  <Grid>
    <pg:PropertyGrid SelectedObject="{StaticResource BusinessObject}">

      <pg:PropertyGrid.Layout>
        <pg:CategorizedLayout/>
      </pg:PropertyGrid.Layout>

      <pg:PropertyGrid.Editors>
        <pg:CategoryEditor DeclaringType="{x:Type local:BusinessObject}" 
                           CategoryName="Text" 
                           InlineTemplate="{x:Static local:EditorKeys.TextCategoryEditorKey}"/>
      </pg:PropertyGrid.Editors>

    </pg:PropertyGrid>
  </Grid>
</Window>
